<template>
    <div class="AdDetails">
        <cjcNav title="查看详情" @customRouter="customRouter" />
        <!-- 进度条 -->
        <ASprogress :EventList="this.$store.state.Administrator.EventList" />
        <br>
        <!-- 列表展示 -->
        <ADlsitShow :EventList="this.$store.state.Administrator.EventList"/>
        <br>
        <!-- 发布处理 -->
        <ADissue :EventList="this.$store.state.Administrator.EventList" v-if="page === 'wait'" />
        <!-- 处理情况 -->
        <ADhandling :EventList="this.$store.state.Administrator.EventList" v-if="page === 'complate' || page === 'SAbyEventIdList' || page === 'SAbyStatusList'" />
    </div>
</template>

<script>
export default {
    components: {
        cjcNav: () => import('@/components/common/Nav.vue'),
        ASprogress: () => import('@/components/Administrator/ASprogress.vue'),
        ADlsitShow: () => import('@/components/Administrator/ADlsitShow.vue'),
        ADissue: () => import('@/components/Administrator/ADissue.vue'),
        ADhandling: () => import('@/components/Administrator/ADhandling.vue'),
    },
    data() {
        return {
            page: null,
            event_id: null,
            EventList: null
        }
    },
    watch: {
        '$store.state.Administrator.EventList'() {
            this.EventList = this.$store.state.Administrator.EventList
        }
    },
    methods: {
        customRouter() {
            this.$router.push({
                name: this.page
            })
        },
        /**
         *  设置建议流列表
         */
        async setEvent() {
            const State = this.$store.state
            let EventList = await this.$store.dispatch('getEvent', {
                userId: State.userInfo.USER_ID,
                event_id: this.event_id
            })
            this.$store.commit('SET_EventList', EventList.result)
        }
    },
    created() {
        this.page = sessionStorage.getItem('page')
        this.event_id = sessionStorage.getItem('EVENT_ID')
    }
}
</script>

<style>

</style>
